package jvm.classloading;

/**
 * todo
 *
 * @author: luolidong
 * @create: 2021-07-08 21:15
 * @version: 1.0
 */
public class FieldResolution {
    interface Interface0 {
        int A = 0;
    }

    interface Interface1 extends Interface0 {
        int A = 1;
    }

    interface Interface2 {
        int A = 2;
    }

    static class Parent implements Interface1 {
        public static int A = 3;
    }

    static class Sub extends Parent implements Interface2 {
//        public static int A = 4;
    }

    /*
        Error:(32, 31) java: 对A的引用不明确
        jvm.classloading.FieldResolution.Parent 中的变量 A
        和 jvm.classloading.FieldResolution.Interface2 中的变量 A 都匹配
    */
    public static void main(String[] args) {
//        System.out.println(Sub.A);
    }
}
